<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path=request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>添加专辑视频</title>
	<link type="text/css" href="<%=path%>/css/addForm.css" rel="stylesheet"/>
	<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/js/albumVideo.js"></script>
	<link type="text/css" rel="stylesheet" href="<%=path%>/css/list.css"/>
</head>

<body>
	<h3>添加专辑视频</h3>
	
<form action="" method="post">
        <div>
        	<span class="formtext">视频标题:</span>
        	<input class="inputbox" type="text" id="title" maxlength="100"/>
        	<span class="error">*</span>
        </div>
        <div>
        	<span class="formtext">视频位置:</span>
        	<input class="inputbox" type="text" id="videopath" maxlength="100"/>
        	<span class="error">*</span></div>
        <div>
        	 <input type="hidden" value="${id}" id="albumid"/>
        	 <span class="button"><input type="button" value="添加" onclick="addVideo();"/></span>
             <span class="button"><input type="reset" value="重置"/></span>
        </div>
        
</form>
<a href="javascript:history.go(-1);">返回列表</a>&nbsp;&nbsp;&nbsp;<span id="re"></span>

<h3>专辑视频列表</h3>
<a href="<%=path%>/album/videolist.dch?id=${id}">刷新列表</a>

<table class="datalist" id="member">
	<tr>
		<th scope="col">ID</th>
		<th scope="col">名字</th>
		<th scope="col">所属专辑</th>
		<th scope="col">视频位置</th>
        <th scope="col">发布时间</th>
        <th scope="col" colspan='2'>操作</th>
	</tr>
	<s:iterator value="list" id="v">
		<tr id="${v.videoid}">
			<td>${v.videoid}</td>
			<td><span class="info">${fn:substring(v.title,0,20)}<span class="minfo">${v.title}</span></span></td>
			<td>${v.album.albumname}</td>			
			<td><span class="info">${fn:substring(v.videopath,0,10)}<span class="minfo">${v.videopath}</span></span></td>
			<td><span class="info">${fn:substring(v.publishtime,0,10)}<span class="minfo">${v.publishtime}</span></span></td>
			<td>
				<a href="<%=path%>/albumvideo/queryVideo.dch?albumid=${v.videoid}">修改</a>&nbsp;&nbsp;
				<a href="#" onclick="deletem(${v.videoid})">删除</a>				
			</td>
		</tr>
	</s:iterator>
</table>
</body>
</html>
